package com.pg.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pg.entity.cj.Jjd;
import com.pg.mapper.JjdMapper;
import com.pg.service.JjdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 洁净度 服务实现类
 * </p>
 *
 * @author likl
 * @since 2020-07-06
 */
@Service
@DS("proxyDs")
@Primary
public class JjdServiceImpl extends ServiceImpl<JjdMapper, Jjd> implements JjdService {

    @Autowired
    private JjdMapper jjdMapper;

    @Override
    public List<Jjd> selectForList(Page<?> page, Jjd jjd, Date startCheckTime, Date endCheckTime) {
        if (null == jjd) {
            return jjdMapper.selectForList(page, null, null, null, null, null, null, null, null);
        }
        return jjdMapper.selectForList(page, jjd.getSupplierWorkNo(), jjd.getSupplierCode(), jjd.getCategoryType(), jjd.getEquipmentName(), startCheckTime, endCheckTime, jjd.getPdCode(), jjd.getProductModel());
    }

}
